#pragma once

#include <AST/ExprAST.hpp>

class If : public Expr {
  private:
    Expr *condition, *thenExpr, *elseExpr;

  public:
    If(Expr *condition, Expr *thenExpr, Expr *elseExpr);

    virtual Value *codegen() override;

    friend class graphviz::GraphGenerator;

    virtual VisitResult accept(ASTVisitor &visitor) const override {
        return visitor.visitIfAST(this);
    }
};